package cn.shop.merchant.model.media;

import cn.shop.merchant.model.BaseEntity;
import cn.shop.utils.enums.Status;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.validation.constraints.NotBlank;

/**
 * @author : 李一涵
 * @date : Created in 2021-11-3 17:17
 * @description : 新闻类
 */
@TableName("merchant_news")
@SuppressWarnings("unused")
public class News extends BaseEntity {

    /** 标题 */
    @NotBlank(message = "标题不能为空")
    private String title;
    /** 作者 */
    private String author;
    /** 来源 */
    private String source;
    /** 内容 */
    @NotBlank(message = "内容不能为空")
    private String content;

    private Status status;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return super.toString() + "News{" +
                "title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", source='" + source + '\'' +
                ", content='" + content + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
